import java.util.Scanner;

/**
 * @ClassName FibTest
 * @Description 求斐波那契数列的第n项。(迭代实现)
 * @Author 李明忠
 * @Date 2025/5/17 22:34
 * @Version 1.0
 */
public class FibTest {
    public static void main(String[] args) {
        //1 1 2 3 5 8
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int f1 = 1;
        int f2 = 1;
        int ret = 0;
        for(int i = 3; i <= n; i++){
            ret = f1 + f2;
            f1 = f2;
            f2 = ret;
        }
        System.out.println(ret);
    }
}
